Integrand size = 21, antiderivative size = 61 \[ \int \frac {\cot ^2(c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {x}{a}-\frac {\cot (c+d x) (3-2 \sec (c+d x))}{3 a d}+\frac {\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d} \]
Time = 1.02 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.64 \[ \int \frac {\cot ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\sec (c+d x) \left (-12 d x \cos ^2\left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right ) \left (3 \cot \left (\frac {1}{2} (c+d x)\right ) \csc \left (\frac {c}{2}\right )+13 \sec \left (\frac {c}{2}\right )\right ) \sin \left (\frac {d x}{2}\right )-\tan \left (\frac {1}{2} (c+d x)\right )\right )}{6 a d (1+\sec (c+d x))} \]
(Sec[c + d*x]*(-12*d*x*Cos[(c + d*x)/2]^2 + Cos[(c + d*x)/2]*(3*Cot[(c + d *x)/2]*Csc[c/2] + 13*Sec[c/2])*Sin[(d*x)/2] - Tan[(c + d*x)/2]))/(6*a*d*(1 + Sec[c + d*x]))
Time = 0.40 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.05, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3042, 4376, 25, 3042, 4370, 25, 3042, 4370, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cot ^2(c+d x)}{a \sec (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\cot \left (c+d x+\frac {\pi }{2}\right )^2 \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )}dx\) |
\(\Big \downarrow \) 4376 |
\(\displaystyle \frac {\int -\cot ^4(c+d x) (a-a \sec (c+d x))dx}{a^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\int \cot ^4(c+d x) (a-a \sec (c+d x))dx}{a^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\int \frac {a-a \csc \left (c+d x+\frac {\pi }{2}\right )}{\cot \left (c+d x+\frac {\pi }{2}\right )^4}dx}{a^2}\) |
\(\Big \downarrow \) 4370 |
\(\displaystyle -\frac {\frac {1}{3} \int -\cot ^2(c+d x) (3 a-2 a \sec (c+d x))dx-\frac {\cot ^3(c+d x) (a-a \sec (c+d x))}{3 d}}{a^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {-\frac {1}{3} \int \cot ^2(c+d x) (3 a-2 a \sec (c+d x))dx-\frac {\cot ^3(c+d x) (a-a \sec (c+d x))}{3 d}}{a^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {-\frac {1}{3} \int \frac {3 a-2 a \csc \left (c+d x+\frac {\pi }{2}\right )}{\cot \left (c+d x+\frac {\pi }{2}\right )^2}dx-\frac {\cot ^3(c+d x) (a-a \sec (c+d x))}{3 d}}{a^2}\) |
\(\Big \downarrow \) 4370 |
\(\displaystyle -\frac {\frac {1}{3} \left (\frac {\cot (c+d x) (3 a-2 a \sec (c+d x))}{d}-\int -3 adx\right )-\frac {\cot ^3(c+d x) (a-a \sec (c+d x))}{3 d}}{a^2}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle -\frac {\frac {1}{3} \left (\frac {\cot (c+d x) (3 a-2 a \sec (c+d x))}{d}+3 a x\right )-\frac {\cot ^3(c+d x) (a-a \sec (c+d x))}{3 d}}{a^2}\) |
-((-1/3*(Cot[c + d*x]^3*(a - a*Sec[c + d*x]))/d + (3*a*x + (Cot[c + d*x]*( 3*a - 2*a*Sec[c + d*x]))/d)/3)/a^2)
3.1.68.3.1 Defintions of rubi rules used
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( a_)), x_Symbol] :> Simp[(-(e*Cot[c + d*x])^(m + 1))*((a + b*Csc[c + d*x])/( d*e*(m + 1))), x] - Simp[1/(e^2*(m + 1)) Int[(e*Cot[c + d*x])^(m + 2)*(a* (m + 1) + b*(m + 2)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && L tQ[m, -1]
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( a_))^(n_), x_Symbol] :> Simp[a^(2*n)/e^(2*n) Int[(e*Cot[c + d*x])^(m + 2* n)/(-a + b*Csc[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && EqQ[a ^2 - b^2, 0] && ILtQ[n, 0]
Time = 0.62 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.97
method | result | size |
derivativedivides | \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3}+4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-8 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{4 d a}\) | \(59\) |
default | \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3}+4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-8 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{4 d a}\) | \(59\) |
risch | \(-\frac {x}{a}+\frac {2 i \left (3 \,{\mathrm e}^{3 i \left (d x +c \right )}-5 \,{\mathrm e}^{i \left (d x +c \right )}-4\right )}{3 d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}\) | \(67\) |
1/4/d/a*(-1/3*tan(1/2*d*x+1/2*c)^3+4*tan(1/2*d*x+1/2*c)-8*arctan(tan(1/2*d *x+1/2*c))-1/tan(1/2*d*x+1/2*c))
Time = 0.29 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.05 \[ \int \frac {\cot ^2(c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {4 \, \cos \left (d x + c\right )^{2} + 3 \, {\left (d x \cos \left (d x + c\right ) + d x\right )} \sin \left (d x + c\right ) + \cos \left (d x + c\right ) - 2}{3 \, {\left (a d \cos \left (d x + c\right ) + a d\right )} \sin \left (d x + c\right )} \]
-1/3*(4*cos(d*x + c)^2 + 3*(d*x*cos(d*x + c) + d*x)*sin(d*x + c) + cos(d*x + c) - 2)/((a*d*cos(d*x + c) + a*d)*sin(d*x + c))
\[ \int \frac {\cot ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\int \frac {\cot ^{2}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]
Time = 0.32 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.52 \[ \int \frac {\cot ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\frac {\frac {12 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a} - \frac {24 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {3 \, {\left (\cos \left (d x + c\right ) + 1\right )}}{a \sin \left (d x + c\right )}}{12 \, d} \]
1/12*((12*sin(d*x + c)/(cos(d*x + c) + 1) - sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/a - 24*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a - 3*(cos(d*x + c) + 1)/(a*sin(d*x + c)))/d
Time = 0.33 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.08 \[ \int \frac {\cot ^2(c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {\frac {12 \, {\left (d x + c\right )}}{a} + \frac {a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 12 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{3}} + \frac {3}{a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{12 \, d} \]
-1/12*(12*(d*x + c)/a + (a^2*tan(1/2*d*x + 1/2*c)^3 - 12*a^2*tan(1/2*d*x + 1/2*c))/a^3 + 3/(a*tan(1/2*d*x + 1/2*c)))/d
Time = 14.22 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.07 \[ \int \frac {\cot ^2(c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {x}{a}-\frac {\frac {4\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}-\frac {7\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{6}+\frac {1}{12}}{a\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )} \]